class StatusCode {
  static const Error = 0;
  static const Success = 1;
  static final codeMessage = <int, String>{
    Error: "错误",
    Success: "成功",
    901: "打开失败"
  };


  ///
  /// 获取错误描述
  ///
  static String getMessage(int code) {
    if (codeMessage.containsKey(code)) {
      return codeMessage[code];
    } else {
      return "未知错误";
    }
  }
}
